<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>参数-增加</title>
	<link rel="stylesheet" type="text/css" href="../resource/css/base.css" />
	<s:actionmessage/>
	<script type="text/javascript">
		function $(id){return document.getElementById(id);}
		function doSumbit(){
			var form = document.forms[0];
			if($('paramKey').value==""){
				alert("请输入参数键字段.");
				return false;
			}
			if($('paramKey').value.length>2){
				alert("参数键字段过长,请重新输入.");
				return false;
			}
			if($('paramValue').value==""){
				alert("请输入参数值字段.");
				return false;
			}
			form.action="add.action";
			form.submit();
		}
		</script>

</head>
<body  oncontextmenu="return false;" leftmargin="8" topmargin="8">
<div class="tip"><span>当前位置:</span>参数管理&nbsp;&gt;&nbsp;新增&nbsp;&gt;&nbsp;</div>
<s:form name="add" namespace="/parameter">
<table class="edittb" cellpadding="2" cellspacing="1">
	<tr bgcolor="#EEF4EA">
		<td height="35" colspan="6">&nbsp;参数信息&nbsp;</td>
	</tr>
	<tr>
		<td class="coln"><SPAN style="color: red">*</SPAN> 参 数 键</td>
		<td width="35%" class="colv">
			<s:textfield id="paramKey" name="parameter.id.paramKey"/>
		</td>
		<td class="coln"><SPAN style="color: red">*</SPAN> 参 数 值</td>
		<td width="45%" class="colv">
			<s:textfield id="paramValue" name="parameter.paramValue"/>
		</td>
		<td class="coln"><SPAN style="color: red">*</SPAN> 参数名称</td>
		<td class="colv">
			<s:select name="parameter.id.paramType" cssStyle="width:120px;" list="parmTypes" listKey="key" listValue="value"/>
		</td>
	</tr>
	<tr>
		<td class="coln">参数描述</td>
		<td colspan="5" class="colv">
			<s:textarea name="parameter.paramDesc"></s:textarea>
		</td>
	</tr>
	<tr align="right" bgcolor="#EEF4EA">
		<td height="35" colspan="6" align="center">
			<a href="javascript:history.go(-1)" class="coolbg">&nbsp;返&nbsp;回&nbsp;</a>
			<a href="#" class="coolbg" onclick="doSumbit();">&nbsp;保&nbsp;存&nbsp;</a>
			<a href="javascript:document.forms[0].reset()" class="coolbg">&nbsp;重&nbsp;置&nbsp;</a>
		</td>
	</tr>
</table>
</s:form>
</body>
</html>
